FROM golang as build

ENV GOPROXY=https://goproxy.io

ADD . ${GOPATH}/src/fabric_asset_management_system/application

WORKDIR ${GOPATH}/src/fabric_asset_management_system/application

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o api_server

RUN ls

RUN cp ./api_server /usr/bin/api_server

RUN chmod +x /usr/bin/api_server

ENTRYPOINT ["api_server"]